<?php
// +----------------------------------------------------------------------
// | 云游线路产品开发
// +----------------------------------------------------------------------
// | Author: TongBC <50249101@qq.com>
// +----------------------------------------------------------------------
// | Date  : 2015/02/03
// +----------------------------------------------------------------------
// | table : pft_scenic
// +----------------------------------------------------------------------
use \pft\Prod\Product;
include 'common/header.html';
include 'common/left.html';
include 'common/autoload.php';
include 'common/prodField.php';
include_once '/var/www/html/new/d/module/common/Db.class.php';

// 远端服务器配置信息
$dbConf = include '/var/www/html/new/d/module/common/db.conf.php';
use \PFT\Db;
Db::Conf($dbConf['remote_1']);

$ptype = strtoupper($_GET['type']);
$saveBtn = '<button class="ui-button ui-button-lblue" id="saveProduct" data-wrap="ticketBox" type="button">保存，返回列表</button>';

$apply_did = $_SESSION['sid'];// 供应商ID

// 身份认证
if($_SESSION['dtype']==6 && $_SESSION['sdtype']!=0) {
    exit('您的上级不是供应商身份，无法发布产品。');
}elseif($_SESSION['dtype']!=0 && $_SESSION['dtype']!=9) {
    exit('您不是供应商身份，无法发布产品。');
}

// 获取子景点信息
$cid = $_REQUEST['id'] + 0;
if($cid>0){
	$scenic = array();
	$sql="select * from pft_scenic where id=$cid limit 1";
	$scenic = Db::fetch($sql);
}
// print_r($scenic);
// $thumb = $scenic['thumb_path'] ? $scenic['thumb_path']:'http://www.12301.cc/images/defaultThum.jpg';
// $video = $scenic['video_path'] ? $scenic['video_path']:'';
// $voice = $scenic['intro_voice_path'] ? $scenic['intro_voice_path']:'';
// $panorama = $scenic['degree_path'] ? $scenic['degree_path']:'';
$thumb = $scenic['thumb_path'] ? $scenic['thumb_path']:'http://www.12301.cc/images/defaultThum.jpg';
$video = $scenic['video_path'] ? $scenic['video_path']:'';
$voice = $scenic['intro_voice_path'] ? $scenic['intro_voice_path']:'';
$panorama = $scenic['degree_path'] ? $scenic['degree_path']:'';


// 父景点ID 即 uu_land 表 id
$parent_id = $_REQUEST['lid'];
// if(empty($parent_id)) exit('非法访问');

$page_title = "产品发布 - ";
include '/var/www/html/new/d/tpl/prod_edits_child.html';
?>